package net.wanho.dao.impl;

import net.wanho.dao.UserDao;
import net.wanho.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Author：汤小洋
 * Date：2024-12-11 16:23
 * Description：<描述>
 */
@Repository
public class UserDaoImpl implements UserDao {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    @Override
    public void insert(String username, String password) {
        String sql = "insert into t_user (username,password) values (?,?)";
        jdbcTemplate.update(sql, username, password);
    }

    @Override
    public List<User> selectAll() {
        return null;
    }
}
